﻿<Window x:Class="Sample.StartTrading.RoboViewerBasic"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:EcngTradingXaml="clr-namespace:StockSharp.Xaml;assembly=StockSharp.Xaml"
    Title="ROBOT_VIEWER" Height="478" Width="879" FontSize="14">
    <Grid Width="853">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="471*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="200" />
        </Grid.RowDefinitions>

        <Grid HorizontalAlignment="Left" Width="853" Opacity="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="280" />
                <ColumnDefinition Width="280" />
                <ColumnDefinition Width="150*" />
            </Grid.ColumnDefinitions>
            <Menu Height="22" HorizontalAlignment="Left" Margin="10,10,0,0" Name="MainMenu" VerticalAlignment="Top" Width="241" FontSize="13" FontWeight="Bold" FontStyle="Normal" FontStretch="UltraExpanded">
                <MenuItem Header="Open" Width="80">
                    <MenuItem Header="Robot" Click="OpenRobot_Click" />
                    <MenuItem Header="SelectedRobot" Click="OpenSelectedRobot_Click" />
                    <MenuItem Header="Robotx_Type" IsEnabled = "False">
                        <MenuItem Header="ALL" />
                        <MenuItem Header="Automat" />
                        <MenuItem Header="BiasAutomat" />
                        <MenuItem Header="Manual" />
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="Create" Width="80">
                    <MenuItem Header="NewRobot" IsEnabled="True" Click="CreateRobot_Click" />
                    <MenuItem Header="Robotx_Type">
                        <MenuItem IsEnabled="False" Click="CreateRobot_Click" Header="NewRobot" />
                    </MenuItem>
                    <MenuItem Header="Сделки" />
                    <MenuItem Header="График прибыли" />
                    <MenuItem Header=" Свечки" />
                </MenuItem>
                <MenuItem Header="Service" Width="80">
                    <MenuItem Header="AdjustPositions" />
                </MenuItem>
            </Menu>
            <Grid Height="221" HorizontalAlignment="Left" Margin="0,12,0,0" Name="grid1" VerticalAlignment="Top" Width="270" Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="21*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="130" />
                    <ColumnDefinition Width="120*" />
                </Grid.ColumnDefinitions>
                <!--<Label Content="AccountTOTAL" Grid.ColumnSpan="2" Grid.RowSpan="2" Height="31" HorizontalAlignment="Left" Margin="2,1,0,0" Name="label1" VerticalAlignment="Top" Width="116" />-->
                <Label Content="AccountTOTAL:" Grid.Row="0"  ToolTip="Всего денег на счете в моменте" />
                <Label x:Name="AccountTOTAL" Grid.Row="0" Grid.Column="1" />
                <Label Grid.Column="0" Grid.Row="1" Content="AccountLimits:" ToolTip="Всего игровых денег с учетом плеча" />
                <Label x:Name="AccountLimits" Grid.Row="1" Grid.Column="1" />
                <Label Grid.Column="0" Grid.Row="2" Content="SecuritiesLimits:" ToolTip="Лимиты по различным бумагам" />
                <Label x:Name="SecuritiesLimits" Grid.Row="2" Grid.Column="1" />
                <Label Grid.Column="0" Grid.Row="3" Content="SumOpenPositions:" ToolTip="Суммарные открытые позиции по различным бумагам" Uid="PL с момента закрытия прошлого дня" UseLayoutRounding="False" />
                <Label x:Name="SumOpenPositions" Grid.Row="3" Grid.Column="1" />
                <Label Grid.Column="0" Grid.Row="4" Content="DayPL:" ToolTip="PL по счету с момента закрытия прошлого дня" />
                <Label x:Name="DayPL" Grid.Row="4" Grid.Column="1" />
            </Grid>
            <Grid Height="221" HorizontalAlignment="Left" Margin="11,10,0,0" Name="grid2" VerticalAlignment="Top" Width="270" Grid.Column="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="130" />
                    <ColumnDefinition Width="120*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="21*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                    <RowDefinition Height="22*" />
                </Grid.RowDefinitions>
                <Label Content="RobotsTOTAL:" Grid.Row="0" ToolTip="Заработок суммарный роботов" />
                <Label Grid.Column="1" Name="RobotsTOTAL" />
                <Label Content="RobotLimits:" Grid.Row="1" ToolTip="Выделенные денежные лимиты для роботов" />
                <Label Grid.Column="1" Grid.Row="1" Name="RobotLimits" />
                <Label Content="RobotSecurLimits:" Grid.Row="2" ToolTip="Выделенные для роботов лимиты по бумагам" />
                <Label Grid.Column="1" Grid.Row="2" Name="RobotSecurLimits" />
                <Label Content="RobotOpenPositions:" Grid.Row="3" ToolTip="Открытые позиции по роботам (таблица ListView внизу)" />
                <Label Grid.Column="1" Grid.Row="3" Name="RobotOpenPositions" />
                <Label Content="RobotDayPL:" Grid.Row="4" ToolTip="PL роботов с закрытия прошлого дня" />
                <Label Grid.Column="1" Grid.Row="4" Name="RobotDayPL" />
                <Label Content="DeltaOpenPositions:" Grid.Row="6" ToolTip="Расхождение позиций между Роботом и Счетом" />
            </Grid>
        </Grid>

        <Grid Grid.Row="1" Grid.ColumnSpan="4">
            <Grid.RowDefinitions>
                <RowDefinition Height="194*" />
                <RowDefinition Height="6*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="872*" />
            </Grid.ColumnDefinitions>
            <ListView AllowDrop="True" AlternationCount="0" Background="Beige" BorderThickness="3"   Height="194" HorizontalAlignment="Left" HorizontalContentAlignment="Left" IsManipulationEnabled="False" Name="listView2" OpacityMask="BlueViolet" Padding="2" SelectedIndex="-1" SelectionMode="Extended" SnapsToDevicePixels="True" UseLayoutRounding="False" VerticalAlignment="Top" VerticalContentAlignment="Top" Width="849" FontSize="12" ToolTip="тип работы: Автомат/ПолуАвтомат/Ручной">
                <ListView.View>
                    <GridView AllowsColumnReorder="True">
                        <GridViewColumn DisplayMemberBinding="{Binding}" Header="N" />
                        <GridViewColumn Header="x_Mode" Width="45" />
                        <GridViewColumn Header="x_Type" Width="45" />
                        <GridViewColumn Header="RoboName" Width="90" />
                        <GridViewColumn Header="x_Security" Width="50" />
                        <GridViewColumn Header="Buy/Sell" Width="50" />
                        <GridViewColumn Header="Lots" Width="45" />
                        <GridViewColumn Header="TF" Width="Auto" />
                        <GridViewColumn Header="TimeON" Width="55" />
                        <GridViewColumn Header="TimeOFF" Width="55" />
                        <GridViewColumn Header="SF_x_Mode" Width="50" />
                        <GridViewColumn Header="SigLevel" Width="55" />
                        <GridViewColumn Header="PosLevel" Width="55" />
                        <GridViewColumn Header="LAST" />
                        <GridViewColumn Header="PosTime" Width="55" />
                        <GridViewColumn Header="StpLevel" Width="55" />
                        <GridViewColumn Header="TgtLevel" Width="55" />
                    </GridView>
                </ListView.View>
            </ListView>
        </Grid>
    </Grid>
</Window>

